import axios from "axios"

export default {
    namespaced: true,
    state() {
        return {
            userList: []
        }
    },
    mutations: {
        subUser(state, data) {
            state.userList = data
        }
    },
    actions: {
        async getUser(context) {
            const { data } = await axios.get('http://localhost:3000/userList')
            context.commit('subUser', data)
        }

    },
    getters: {

    }
}